Score-based Data Assimilation StormCast#730
Merged
NickGeneva merged 70 commits intoNVIDIA:mainfrom Mar 11, 2026
Merged
Conversation
Contributor
Greptile SummaryThis PR introduces Key changes:
|
| Filename | Overview |
|---|---|
| earth2studio/models/da/sda_stormcast.py | Core StormCast SDA implementation — large, well-structured new file. NaN observation values are not filtered before scatter-add in _build_obs_tensors, which can silently corrupt DPS guidance. Most previously-flagged issues (debug prints, mutable default args, typos, sorting guard, duplicate obs averaging, sampler_args key validation) have been addressed. |
| earth2studio/data/utils.py | Adds a legacy mode to fetch_data that returns a raw xr.DataArray with cupy backing on CUDA. The device.index or 0 guard is correctly applied in the new non-legacy path. Minor: interp_method is silently ignored in the non-legacy path when interp_to=None. |
| earth2studio/models/da/base.py | Protocol extended to allow None observations in __call__ and create_generator, and adds optional *args init parameters and init_coords() method. Changes are clean and well-documented. |
| earth2studio/models/da/interp.py | Renames tolerance to time_tolerance and adds init_coords() returning None. The rename is a breaking API change but accepted per prior thread discussion. Smolyak interpolation logic is unchanged and looks correct. |
| earth2studio/utils/coords.py | New map_coords_xr function implementing GPU/CPU-aware nearest-neighbor coordinate mapping without calling xarray.interp() (avoiding the previous scipy/CPU-only path). Uses sort-based searchsorted with correct ascending-order handling via np.argsort. Logic looks correct. |
| examples/21_stormcast_sda.py | Well-written end-to-end example. cartopy/matplotlib are imported twice (lines 165–167 and 235–237), which is redundant. The .get() calls are CUDA-specific but the example is documented as GPU-only. Other previously flagged issues appear to be addressed. |
| test/models/da/test_da_sda_stormcast.py | Comprehensive test suite covering polygon point-in-polygon, observation tensor building (including None, out-of-grid, and duplicate-averaging cases), conditioning fetch, __call__, create_generator, and exception handling. GPU interpolation test validates against scipy reference. Good coverage. |
| test/data/test_data_utils.py | New tests for the legacy=False mode of fetch_data and updated prep_data_inputs behaviour. Coverage looks correct and complete. |
Last reviewed commit: 45d157f
Collaborator
Author
|
@greptile-ai |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Collaborator
Author
|
/blossom-ci |
Collaborator
Author
|
/blossom-ci |
Collaborator
Author
|
/blossom-ci |
1 similar comment
Collaborator
Author
|
/blossom-ci |
pzharrington
approved these changes
Mar 11, 2026
Collaborator
Author
|
/blossom-ci |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Earth2Studio Pull Request
Description
create_generatorand the first set of parameters in callCoverage:
Rendered Example
Closer results
Checklist
Dependencies